// 引入工具类
import request from '@/utils/request.js' 
 
const homePage = {
	getBanner: data => {// 获取token
		return request({
			url: '/wx/banner/list',
			method: 'GET',
			data: data,
			isLoading: true ,//是否需要显示加载动画
			isLogin: false //是否需要登录 需要则带入token
		})
	},
	getCitry: data => {// 获取省市
		return request({
			url: '/wx/prov/citypickerJson',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: false 
		})
	},
	getCarList: data => {// 获取车辆列表
		return request({
			url: '/wx/usedCar/list',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: true 
		})
	},
	usedCarListt: data => {// 获取车辆列表
		return request({
			url: '/wx/Trader/usedCarList',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: true 
		})
	},
	
	getNews:data =>{// 获取资讯列表
		return request({
			url: '/wx/article/list',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: false 
		})
	},
	getCarInfo:data =>{// 获取车辆详情
		return request({
			url: '/wx/usedCar/detail',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: true 
		})
	},
	
	TraderInfo: data => {// 获取商家信息
		return request({
			url: '/wx/Trader/TraderInfo',
			method: 'POST',
			data: data,
			contentType:'application/x-www-form-urlencoded',
			isLoading: false ,//是否需要显示加载动画
			isLogin: true //是否需要登录 需要则带入token
		})
	},
	getIndexValuation:data =>{ // 
		return request({
			url: '/wx/index/valuation',
			method: 'GET',
			data: data,
			isLoading: false ,
			isLogin: false 
		})
	},
	getWithPriceList:data =>{ //获取同价位车
		return request({
			url: '/wx/usedCar/withPriceList',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: true 
		})
	},
	getWithSeriesList:data =>{ //获取同系列车
		return request({
			url: '/wx/usedCar/withSeriesList',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: true 
		})
	},
	getCarAnalysis:data =>{ //车辆详情二手车详情-车况分析
		return request({
			url: '/wx/usedCar/carAnalysis',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: true 
		})
	},
	getCarMarketInfo:data =>{ //车辆详情二手车详情-市场行情信息
		return request({
			url: '/wx/usedCar/carMarketInfo',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: true 
		})
	},
	getCarMarketList:data =>{ //车辆详情二手车详情-市场行情信息
		return request({
			url: '/wx/usedCar/carMarketList',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: true 
		})
	},
	getLoanStatus:data =>{ //获取贷款功能状态
		return request({
			url: '/wx/rest/system/loan',
			method: 'GET',
			data: data,
			isLoading: false ,
			isLogin: false 
		})
	},
	postAddLiker:data =>{ //添加收藏
		return request({
			url: '/wx/my/addCollect',
			method: 'POST',
			data: data,
			contentType:'application/x-www-form-urlencoded',
			isLoading: true ,
			isLogin: true 
		})
	},
	postRemoveLiker:data =>{ //取消收藏
		return request({
			url: '/wx/my/reCollect',
			method: 'POST',
			data: data,
			contentType:'application/x-www-form-urlencoded',
			isLoading: true ,
			isLogin: true 
		})
	},
	getFastValuation: data => {// 快速估值
		return request({
			url: '/wx/fastValuation/getFastValuation',
			method: 'POST',
			data: data,
			contentType:'application/x-www-form-urlencoded',
			isLoading: true ,
			isLogin: true 
		})
	},
	chatroomAdd: data => {// 聊天
		return request({
			url: '/wx/chatroom/add',
			method: 'post',
			data: data,
			contentType:'application/x-www-form-urlencoded',
			isLoading: false,
			isLogin: true 
		})
	},
	checkChatroom: data => {// 聊天
		return request({
			url: '/wx/chatroom/checkChatroom',
			method: 'post',
			data: data,
			contentType:'application/x-www-form-urlencoded',
			isLoading: true ,
			isLogin: true 
		})
	},
	
	getHomeNewCarList: data => {// 新车列表
		return request({
			url: '/wx/newCar/newCarRecommendList',
			method: 'GET',
			data: data,
			isLoading: true ,
			isLogin: true 
		})
	},
	getchatroom: data => {// 获取所有的消息列表
		return request({
			url: '/wx/chatroom/list',
			method: 'POST',
			data: data,
			contentType:'application/x-www-form-urlencoded',
			isLoading: true ,//是否需要显示加载动画
			isLogin: true //是否需要登录 需要则带入token
		})
	},
	chatroomDetail: data => {// 获取所有的消息列表
		return request({
			url: '/wx/chatroom/detail',
			method: 'POST',
			data: data,
			contentType:'application/x-www-form-urlencoded',
			isLoading: false ,//是否需要显示加载动画
			isLogin: true //是否需要登录 需要则带入token
		})
	},
	
	getUsedCarFastValuation: data => {// 查看报告
		return request({
			url: '/wx/fastValuation/getUsedCarFastValuation',
			method: 'POST',
			data: data,
			contentType:'application/x-www-form-urlencoded',
			isLoading: true ,
			isLogin: true 
		})
	},
	detectionReportList: data => {// 车辆检测
		return request({
			url: '/wx/detectionReport/list',
			method: 'GET',
			data: data,
			isLoading: false ,
			isLogin: true 
		})
	},
	detectionReportDetail: data => {// 车辆检测说明
		return request({
			url: '/wx/detectionReport/detail',
			method: 'GET',
			data: data,
			isLoading: false ,
			isLogin: true 
		})
	},
	detectionPublicParameters: data => {// 检测标准赔付标准
		return request({
			url: '/wx/detectionPublicParameters/detail',
			method: 'GET',
			data: data,
			isLoading: false ,
			isLogin: true 
		})
	},
}

export default homePage

